import { ExecutionContext, createParamDecorator } from "@nestjs/common";

export const User = createParamDecorator((data:unknown,ctx:ExecutionContext)=>{ // 参数装饰器
    const request = ctx.switchToHttp().getRequest()
    return request.user
})